<template>
  <div>
    <Selector placeholder="请选择城市" :data="data" @choose="choose" ></Selector>
  </div>
</template>

<script>
import { reactive } from 'vue'
export default {
  setup(props) {
    const data = reactive([
      {id: 1, value: 111, text: '北京'},
      {id: 2, value: 222, text: '上海'},
      {id: 3, value: 333, text: '广东'},
      {id: 4, value: 444, text: '深圳'},
      {id: 5, value: 555, text: '长沙'},
    ])

    const choose = (item) => {
      console.log(item.id);
    }

    return {
      data,
      choose
    }
  }
}

</script>

<style>
</style>
